/**
 * @Description:electron启动方式
 * @Author: lishibin
 * @Date: 12:19 2022/1/9
 * @version : V0.0.1-beta
 */
import electron from 'electron';

import electronBuilder from '../builders/electron-builder';
import Runner from './runner';

export default class ElectronRunner extends Runner {
  override async build() {
    const { tsup, ...electronOptios } = this.config;
    super.run(tsup);
    electronBuilder(electronOptios);
  }

  getExec() {
    return this.config?.execPath || electron;
  }
}
